<?php

namespace G4T\Util;


use \Doctrine\Common\Annotations\Parser;

class ClassMetadata
{
    /**
     * @static
     * @param $className
     * @return MetadataItem[]
     */
    public static function getMetadata($className)
    {
        if (is_object($className)) {
            $className = get_class($className);
        }

        $reflection = new \ReflectionClass($className);
        $properties = $reflection->getProperties();
        $result = array();
        foreach ($properties as $property) {
            $result[$property->getName()] = new MetadataItem($property);
        }
        return $result;
    }
}
